import {routeInterface} from '$src/router-type';
/**
 * 获取首页的导航路由
 * @param routes
 */
export function getNavRoutes(routes: Array<routeInterface>): Array<routeInterface> {
    let _navRoutes = routes.find(({path}) => path === '/');
    if (_navRoutes && _navRoutes.children) {
        return _navRoutes.children.filter(item => item.meta && item.meta.nav);
    } else {
        return [];
    }
}
